package com.woogiemobile;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Toast;

import com.woogiemobile.async.DataToServer;
import com.woogiemobile.async.SendMessage;
import com.woogiemobile.pojo.Register;

public class MainActivity extends Activity {

	private static int fakeNumber = 1;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		// start the MainService
		startService(new Intent(this, MainService.class));
		
		Toast.makeText(this, "Activity Started", 1000).show();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		
		return true;
	}
	
	public void sendFakeSms(View v)
	{
		new SendMessage("+15149670418", "Fake Message #: " + fakeNumber++).send();
	}

	public void register(View v)
	{
		new DataToServer(Register.getRegister(null, null, null, null).toString(), true).execute();
	}
}
